package com.store.practice.common.utils;

import cn.hutool.core.date.DateUtil;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;

import java.util.Date;
import java.util.UUID;
@Component
public class UploadPicUtil {
    public boolean judgeSuffix(String originalName){
        boolean result = false;
        String[] fileSuffixes = {"BMP", "JPG", "JPEG", "PNG", "GIF"};
        for (String suffix:fileSuffixes){
            if (suffix.equalsIgnoreCase(originalName.substring(originalName.lastIndexOf(".")+1))){
                result = true;
            }
        }
        return result;
    }

}
